1. Field of the Invention
The present invention relates generally to computerized imaging methods and apparatus, and more particularly to a novel imaging apparatus and method in which objects are composed of pixel data in which the transformation of virtual light interacting with them is specified by six explicit transformation components and three implicit transformation components.
2. Brief Description of the Prior Art
Painter's algorithm is the prevalent prior art in computer image composition. This algorithm uses a bottom-to-top "king of the mountain" approach to combine multiple overlayed opaque images. It first lays down the bottom most image (Object B), then writes over (replaces) the portions of that image that are overlayed by the image in the layer above it (Object A), and continues in this fashion until all layers have been composed (FIG. 1). Thus, what is seen on an imaging display are the colors from the topmost objects on the screen. Two pixels (picture elements) from Object A overlap the pixels directly below them in Object B. Since Object B's pixels are drawn to the composite image first, its two pixels that underlie Object A are overwritten as Object A is added to the final image.
One major drawback to Painter's algorithm is that every bit of color data for every object displayed on the screen must be read, transferred, and written to compose the final image. This means that even the portions of objects that are hidden by overlaying objects must be processed identically to those portions of objects that can be seen.
When Painter's algorithm is used with translucent images or graphic objects, an "alpha" blending algorithm is predominantly used to combine the layers. This alpha blending uses either a single number that defines the percentages of each of two layers (the composite layer and the next layer to be added) to use in creating their combination, or a separate alpha percentage for each pixel in the images to be combined.
This second case is shown in FIG. 2, where Object A Alpha defines the percentage of Object A that is combined or blended with the objects below it to yield the composite. In this case, the alpha values for the two pixels of Object A that overlay Object B are 0.40, or 40% of the Object A pixels color is combined with 60% (1-0.4) of the Object B pixels below. An object in the layer directly above Object A is blended next with this A.circle-solid.B composite based on the Alpha layer associated with that object. Each layer above is then blended in turn (thus bottom-up composition) to yield the final composite image.
Painter's algorithm with alpha blending is counter intuitive in the way it blends colors. This is because the metaphor it emulates is that of a painter mixing and applying paints to a canvas. Here, since the painter cannot apply the last layer first, he or she must anticipate the effects of later translucent layers in the selection of the colors first applied to the canvas.
This back-to-front composing gives results that run counter to our experiences in the real world. Our intuitive view of the world is brought to us with light that has propagated to surfaces around us where some is reflected back to us, some is transmitted through the translucent surfaces to those that lie behind, and some is absorbed.